﻿using System;
using System.Collections.Generic;
using System.Text;
using yb.commerce.DAL;
using yb.commerce.Model;
using System.Data;

namespace yb.commerce.BLL
{
    public class ProductAttributeValueBusiness
    {
        public bool Add(ProductAttributeValue productAttributeValue)
        {
            return new ProductAttributeValueDAO().Add(productAttributeValue);
        }

        public bool Delete(int Id)
        {
            return new ProductAttributeValueDAO().Delete(Id);
        }

        public bool Update(ProductAttributeValue productAttributeValue)
        {
            return new ProductAttributeValueDAO().Update(productAttributeValue);
        }

        public ProductAttributeValue GetEntity(int Id)
        {
            return new ProductAttributeValueDAO().GetEntity(Id);
        }

        public DataRecordTable GetList(string fieldList, string orderField, bool orderBy, int pageIndex, int pageSize, string where)
        {
            return new ProductAttributeValueDAO().GetList(fieldList,orderField,orderBy,pageIndex,pageSize,where);
        }
        public ProductAttributeValue GetEntity(ProductAttributeValue o)
        {
            return new ProductAttributeValueDAO().GetEntity(o);
        }
        public int GetRecordCount(string where)
        {
            return new ProductAttributeValueDAO().GetRecordCount(where);
        }
        public bool UpdateByProductIdAndAttributeId(ProductAttributeValue productAttributeValue)
        {
            return new ProductAttributeValueDAO().UpdateByProductIdAndAttributeId(productAttributeValue);
        }
        public bool DeleteByAttributeId(int attributeId)
        {
            return new ProductAttributeValueDAO().DeleteByAttributeId(attributeId);
        }
        public bool DeleteByProductId(int productId)
        {
            return new ProductAttributeValueDAO().DeleteByProductId(productId);
        }
        public DataTable GetList(int attributeId, string attributeValue)
        {
            return new ProductAttributeValueDAO().GetList(attributeId,attributeValue);
        }
    }
}
